import React, {Component} from 'react';
import {Converter} from 'showdown';
import {Http} from '../../common/Http/Http';

class Article extends Component {
    constructor(props) {
        super(props);
        this.state = {};
    }

    componentWillMount() {
        const articleId = this.props.articleId;
        // Http.request("")
        this.state.json = {title: "文章标题", author: "作者信息", content: "<h3 id=\"\">这是</h3>"}
    }


    render() {
        const {title, author, content} = this.state.json;
        return (
            <div className="article">
                <h1 className="title">{title}</h1>
                <div className="author">{author}</div>
                <div className="showdown" dangerouslySetInnerHTML={{__html:(new Converter).makeHtml(content)}}></div>
            </div>
        );
    }
}

export default Article;